package com.example.lyl.testanimation;

import java.util.ArrayList;

/**
 * Created by lyl on 2017/3/1.
 */

public class SlefActivityManager {
    private static ArrayList<Four.CloseActivity> activitys = null;

    private static SlefActivityManager _instance = null;

    private SlefActivityManager(){
        activitys = new ArrayList<>();
    }


    public static SlefActivityManager getInstance(){
        if(_instance == null){
            _instance = new SlefActivityManager();
        }
        return _instance;
    }

    public void addActivty(Four.CloseActivity closeActivity){
        activitys.add(closeActivity);
    }

    public void closeActivity(int index){
        activitys.get(index).finishActivity();
    }

}
